/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chaski.net;

import java.net.ServerSocket;
import java.util.Date;
import javax.swing.JComponent;
import javax.swing.JOptionPane;

/**
 *
 * @author jheorge
 */
public class Servidor extends Thread{
 private JComponent ventana;
 private int puerto;
private Date date;    
public Servidor()
{
    super();
    puerto=4444;
    date=new Date();
    System.out.println("Servidor arriba el :"
            + "fecha:"+date.getDay()+"/"
            +date.getMonth()+"/"
            +date.getYear()+"/"
            +date.getHours()+":"
            +date.getMinutes()+":"
            +date.getSeconds()+"\n");

}

    @Override
    public void run() {
        ServerSocket svd=null;
          

        try {
            svd=new ServerSocket(puerto);
            svd.accept();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(ventana, "error al logar la conexion");
        }
    }


}
